import request from '@/router/axios'

//分页查询待配镜发料分页信息(配镜发料)
export function getGlassesVOPage(query) {
  return request({
    url: '/eims/sale/getGlassesVOPage',
    method: 'get',
    params: query
  })
}
//单条查询待配镜发料信息(配镜发料)
export function getGlassesVOById(saleId) {
  return request({
    url: '/eims/sale/getGlassesVOById/'+saleId,
    method: 'get'
  })
}

//通过配镜单号删除已发料，但没有初检的订单
export function cancelTheOrderByBillId(billId) {
  return request({
    url: '/eims/sale/cancelTheOrder/'+billId,
    method: 'get'
  })
}

//分页查询已完成配镜发料分页信息(配镜发料已完成)
export function getSentGlassesVOPage(query) {
  return request({
    url: '/eims/sale/getSentGlassesVOPage',
    method: 'get',
    params: query
  })
}

//更新销售单为配镜发料状态并出库
export function updateSendGlassSale(obj) {
  return request({
    url: '/eims/sale/updateSendGlassSale',
    method: 'put',
    data: obj
  })
}

//批量更新销售单为配镜发料状态并出库
export function batchUpdateSendGlassSale(obj) {
  return request({
    url: '/eims/sale/batchUpdateSendGlassSale',
    method: 'put',
    data: obj
  })
}
